package com.remotecontrol.invokers;

import com.remotecontrol.commands.GarageDoorOpenCommand;
import com.remotecontrol.commands.LightOnCommand;
import com.remotecontrol.receiver.GarageDoor;
import com.remotecontrol.receiver.Light;

public class RemoteControlTest {
	public static void main(String[] args) {
		SimpleRemoteControl remote = new SimpleRemoteControl();
		Light light = new Light();
		GarageDoor garageDoor = new GarageDoor();
		GarageDoorOpenCommand garageOpen = new GarageDoorOpenCommand(garageDoor);
		LightOnCommand lightOn = new LightOnCommand(light);

		remote.setCommand(lightOn);
		remote.buttonWasPressed();
		remote.setCommand(garageOpen);
		remote.buttonWasPressed();
	}
}
